/**
 * 
 */
package edu.cmu.cs.webapp.ioms.perspectives;

import org.eclipse.ui.IFolderLayout;
import org.eclipse.ui.IPageLayout;
import org.eclipse.ui.IPerspectiveFactory;

import edu.cmu.cs.webapp.ioms.views.FinancialReportView;
import edu.cmu.cs.webapp.ioms.views.FinancialGraphView;


/**
 * @author Christian
 *
 */
public class FinancialAnalysisPerspective implements IPerspectiveFactory {

	/* (non-Javadoc)
	 * @see org.eclipse.ui.IPerspectiveFactory#createInitialLayout(org.eclipse.ui.IPageLayout)
	 */
	@Override
	public void createInitialLayout(IPageLayout layout) {
		layout.setEditorAreaVisible(false);
		
		// create left folder
		IFolderLayout leftFolder = layout.createFolder("leftFolder",
				IPageLayout.LEFT, new Float(0.22).floatValue(),
				IPageLayout.ID_EDITOR_AREA);

		// create top folder(placeholder)
		IFolderLayout topFolder = layout.createFolder("topFolder",
				IPageLayout.TOP | IPageLayout.TOP,
				new Float(0.60).floatValue(), IPageLayout.ID_EDITOR_AREA);

		// IFolderLayout bottomFolder = layout.createFolder("bottomFolder",
		// IPageLayout.BOTTOM, new Float(0.40).floatValue(),
		// IPageLayout.ID_EDITOR_AREA);

		// add orders list view to the top folder
		topFolder.addView(FinancialReportView.ID_VIEW);
		//topFolder.addView(InventoryView.ID_VIEW);
		// add order details view to the left folder
		leftFolder.addView(FinancialGraphView.ID_VIEW);
		// bottomFolder.addView(MaterialsView.ID_VIEW);

		// create left bottom folder relative to order details view
		// IFolderLayout leftBottomFolder = layout.createFolder("leftBottom",
		// IPageLayout.BOTTOM, new Float(0.70).floatValue(),
		// OrderDetailsView.ID_VIEW);
		// //add log view to order details view
		// leftBottomFolder.addView(LogView.ID_VIEW);

		layout.getViewLayout(FinancialReportView.ID_VIEW).setCloseable(false);
		layout.getViewLayout(FinancialGraphView.ID_VIEW).setMoveable(false);
		


	}

}
